var fs = require('fs');
var readline = require('readline');
const http = require('http');
/*
* 按行读取文件内容
* 返回：字符串数组
* 参数：fReadName:文件名路径
*      callback:回调函数
* */
console.log(__dirname);

var list = [
    "js/util.js",
    "js/wstcp.js",
    "js/ResPath.js",
    "js/const.js",
    "js/SeatData.js",

    "js/util/Util.js",
    "js/util/Observer/Observer.js",

    "js/LoadResources.js",
    "js/Card/Card.js",
    "js/Animation/AniManage.js",
    "js/Debug/debugManage.js",

    "js/Panel/Indicator.js",
    "js/Panel/Remind.js",
    "js/Panel/BtnManage.js",
    "js/Panel/EmojiMange.js",
    "js/Panel/UIPanel.js",
    "js/Panel/SettlementPanel.js",
    "js/Panel/MainPanel.js",
    "js/Panel/MainPanel_event.js",
    "js/Panel/MainPanel_net.js",
    "js/Panel/dlgRelease.js",
    "js/GameMain.js",
];


var path = __dirname;
var content = ""
for (var i = 0; i < list.length; i++) {
    var name = list[i];
    var fullPath = path + "/" + name;
    console.log(fullPath)
    var str = fs.readFileSync(fullPath);
    content += str;
}

var sfile = path + '/src/all.js';

console.log("content length=", content.length / 1024)
fs.writeFileSync(sfile, content)


